-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Viewer and headless rendering on windows #83
base: main
Are you sure you want to change the base?
Conversation
I got a numba typeerror. find the output below.
|
Thank you for your reply,but when i modify the code,the other question come. the code below call cam.render(), #cam.render() will call render_offscreen function in viewer.py
this part will block the thread,how can i fix it |
(som) PS E:\code\Genesis_windows> python .\run.py
[Genesis] [14:34:16] [INFO] ╭─────────────────────────────────────────────────────────────────────────────────────╮
[Genesis] [14:34:16] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉│
[Genesis] [14:34:16] [INFO] ╰─────────────────────────────────────────────────────────────────────────────────────╯
[Genesis] [14:34:16] [INFO] Running on [NVIDIA GeForce RTX 3080 Laptop GPU] with backend gs.cuda. Device memory: 16.00 GB.
[Genesis] [14:34:16] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.0, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [14:34:17] [INFO] Scene <b6b2153> created.
[Genesis] [14:34:17] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <4f28967>, morph: <gs.morphs.Plane>, material: <gs.materials.Rigid>.
[Genesis] [14:34:17] [INFO] Adding <gs.RigidEntity>. idx: 1, uid: <75175ca>, morph: <gs.morphs.MJCF(file='E:\code\Genesis_windows\genesis\assets\xml/franka_emika_panda/panda.xml')>, material: <gs.materials.Rigid>.
[Genesis] [14:34:17] [INFO] Building scene <b6b2153>...
[Genesis] [14:34:41] [INFO] Compiling simulation kernels...
[Genesis] [14:35:07] [INFO] Building visualizer...
Traceback (most recent call last):
File "E:\code\Genesis_windows\genesis\ext\pyrender\numba_gl_wrapper.py", line 71, in load_func
func_ptr = GL.platform.ctypesloader.buildFunction(
File "E:\Anaconda\envs\som\lib\site-packages\OpenGL\platform\ctypesloader.py", line 96, in buildFunction
return functionType( (name, dll), )
AttributeError: function 'glGetUniformLocation' not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\code\Genesis_windows\run.py", line 40, in <module>
scene.build()
File "E:\code\Genesis_windows\genesis\utils\misc.py", line 38, in wrapper
return method(self, *args, **kwargs)
File "E:\code\Genesis_windows\genesis\engine\scene.py", line 565, in build
self._visualizer.build()
File "E:\code\Genesis_windows\genesis\vis\visualizer.py", line 101, in build
self._context.build(self._scene)
File "E:\code\Genesis_windows\genesis\vis\rasterizer_context.py", line 70, in build
self.jit = JITRenderer(self._scene, [], [])
File "E:\code\Genesis_windows\genesis\ext\pyrender\jit_render.py", line 201, in __init__
self.gen_func_ptr()
File "E:\code\Genesis_windows\genesis\ext\pyrender\jit_render.py", line 354, in gen_func_ptr
self.gl = GLWrapper()
File "E:\code\Genesis_windows\genesis\ext\pyrender\numba_gl_wrapper.py", line 41, in __init__
load_func("glGetUniformLocation", GLint, GLuint, GLvoidp)
File "E:\code\Genesis_windows\genesis\ext\pyrender\numba_gl_wrapper.py", line 78, in load_func
func_ptr = glplatform.createExtensionFunction(
NameError: name 'glplatform' is not defined. Did you mean: 'GLplatform'?
[Genesis] [14:35:09] [INFO] 💤 Exiting Genesis and caching compiled kernels... Thanks authors for the quick correction! the typo is solved. |
(som) PS E:\code\Genesis_windows> python .\run.py
[Genesis] [16:29:11] [INFO] ╭─────────────────────────────────────────────────────────────────────────────────────╮
[Genesis] [16:29:11] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉│
[Genesis] [16:29:11] [INFO] ╰─────────────────────────────────────────────────────────────────────────────────────╯
[Genesis] [16:29:11] [INFO] Running on [NVIDIA GeForce RTX 3080 Laptop GPU] with backend gs.cuda. Device memory: 16.00 GB.
[Genesis] [16:29:11] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.0, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [16:29:12] [INFO] Scene <480ae95> created.
[Genesis] [16:29:12] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <1d12ad9>, morph: <gs.morphs.Plane>, material: <gs.materials.Rigid>.
[Genesis] [16:29:12] [INFO] Adding <gs.RigidEntity>. idx: 1, uid: <0328e4b>, morph: <gs.morphs.MJCF(file='E:\code\Genesis_windows\genesis\assets\xml/franka_emika_panda/panda.xml')>, material: <gs.materials.Rigid>.
[Genesis] [16:29:12] [INFO] Building scene <480ae95>...
[Genesis] [16:29:31] [INFO] Compiling simulation kernels...
[Genesis] [16:29:55] [INFO] Building visualizer...
[Genesis] [16:29:58] [INFO] Viewer created. Resolution: 1280×960, max_FPS: 60.
0
[Genesis] [16:29:58] [INFO] Running at 120.79 FPS. Hi, I found that my program will stuck at here, and no viewer displayed. I cannot even kill the script. Why? |
Thanks, My program is running normally, but no window pops up. |
Windows 11 Pro for Workstation I do:
(and edited the files to implement this PR) Then I run a basic script: https://genesis-world.readthedocs.io/en/latest/user_guide/getting_started/hello_genesis.html
The simulation works, but does not show the viewer window. What am I doing wrong? |
This PR initially fixes issue #12. Further tests should be investigated.